<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js学习</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>   <!--引入vue.js-->
</head>
<style>
    .active{
        color:red;
    }
    .big{
        font-size:300%;
    }

</style>
<body>
    <div id="xue">
        <div :class="myClass">红色文本</div>
        <button @click="btnClick">改变class吧</button>
    </div>
    <script>
        var hehe = new Vue({
            el: '#xue',
            data: {
                myClass: {
                    active: true,
                    big: true,
                },
            },
            methods: {
                btnClick: function(){
                    this.myClass.big = false;
                },
            },
        });
    </script>
</body>
</html>